from django.urls import path
from . import views

app_name = 'activities'

urlpatterns = [
    # 活动列表和详情
    path('', views.activity_list, name='activity_list'),
    path('<int:activity_id>/', views.activity_detail, name='activity_detail'),
    
    # 活动创建和管理
    path('create/', views.activity_create, name='activity_create'),
    path('<int:activity_id>/edit/', views.activity_edit, name='activity_edit'),
    path('<int:activity_id>/delete/', views.activity_delete, name='activity_delete'),
    
    # 活动报名
    path('<int:activity_id>/register/', views.activity_register, name='activity_register'),
    path('<int:activity_id>/unregister/', views.activity_unregister, name='activity_unregister'),
    
    # 活动签到
    path('<int:activity_id>/checkin/', views.activity_checkin, name='activity_checkin'),
    path('<int:activity_id>/participants/', views.activity_participants, name='activity_participants'),
    
    # 评论和评分
    path('<int:activity_id>/comment/', views.activity_comment, name='activity_comment'),
    path('<int:activity_id>/rate/', views.activity_rate, name='activity_rate'),
    path('comment/<int:comment_id>/like/', views.comment_like, name='comment_like'),
    
    # 分类
    path('category/<int:category_id>/', views.activity_by_category, name='activity_by_category'),
    
    # 附近活动
    path('nearby/', views.nearby_activities, name='nearby_activities'),
    path('nearby/page/', views.nearby_activities_page, name='nearby_activities_page'),

# lmy
    path('api/reverse-geocode/', views.reverse_geocode, name='reverse_geocode'),


    path('<int:activity_id>/comment/', views.activity_comment, name='activity_comment'),
    path('comment/<int:comment_id>/delete/', views.comment_delete, name='comment_delete'),
    path('comment/<int:comment_id>/like/', views.simple_comment_like, name='comment_like'),
    path('comment/image/<int:image_id>/delete/', views.delete_comment_image, name='delete_comment_image'),




]
